package com.kamloo.stg.adapter;

import com.kamloo.stg.R;
import android.content.Context;
import android.view.*;
import android.widget.*;

public class TabBusScheduleArrayAdapter extends ArrayAdapter<String> implements Filterable {
	private String[] values;
    
	public TabBusScheduleArrayAdapter(Context context, String[] values) 
	{
		super(context, R.layout.tab_bus_schedule_row, values);	
		this.values =  values;
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) 
	{
		LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    	View rowView = inflater.inflate(R.layout.tab_bus_schedule_row, parent, false);
	    
		TextView displayView = (TextView) rowView.findViewById(R.id.tabBusScheduleDisplay);
	    displayView.setText(values[position]);
	    
	    return rowView;
	}
}